#define includeBaseJs()

		<!--[if !IE]> 
		<script type="text/javascript">
			window.jQuery || document.write("<script src='#(ctx)/res/ace-1.3.3/assets/js/jquery.js'>"+"<"+"/script>");
		</script>

		  <![endif]-->

		<!--[if IE]>
		<script type="text/javascript">
		 window.jQuery || document.write("<script src='#(ctx)/res/res/ace-1.3.3/assets/js/jquery1x.js'>"+"<"+"/script>");
		</script>
		<![endif]-->
		
		<script src='#(ctx)/res/ace-1.3.3/assets/js/jquery.js'></script>
		<script type="text/javascript">
			if('ontouchstart' in document.documentElement) document.write("<script src='#(ctx)/res/ace-1.3.3/assets/js/jquery.mobile.custom.js'>"+"<"+"/script>");

			(function($){  
				$.fn.serializeJson=function(){
					var serializeObj={};
					var array=this.serializeArray();
					var str=this.serialize();
					$(array).each(function(){
						if(serializeObj[this.name]){
							if($.isArray(serializeObj[this.name])){
								serializeObj[this.name].push(this.value);
							}else{
								serializeObj[this.name]=[serializeObj[this.name],this.value];  
							}
						}else{
							serializeObj[this.name]=this.value;
						}
					});
					return serializeObj;
				};
			})(jQuery);

		</script>
		
		<script src="#(ctx)/res/ace-1.3.3/assets/js/bootstrap.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/jquery-ui.custom.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/jquery.ui.touch-punch.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/chosen.jquery.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/fuelux/fuelux.spinner.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/date-time/bootstrap-datepicker.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/date-time/bootstrap-timepicker.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/date-time/moment.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/date-time/daterangepicker.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/date-time/bootstrap-datetimepicker.js"></script>
		<!-- <script src="#(ctx)/res/ace-1.3.3/assets/js/date-time/bootstrap-datetimepicker.zh-CN.js"></script> -->
		<script src="#(ctx)/res/ace-1.3.3/assets/js/bootstrap-colorpicker.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/jquery.knob.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/jquery.autosize.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/jquery.inputlimiter.1.3.1.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/jquery.maskedinput.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/bootstrap-tag.js"></script>

	
		<script src="#(ctx)/res/ace-1.3.3/assets/js/date-time/bootstrap-datepicker.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/jqGrid/jquery.jqGrid.src.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/jqGrid/i18n/grid.locale-en.js"></script>
		
		
		<!-- ace scripts -->
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/elements.scroller.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/elements.colorpicker.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/elements.fileinput.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/elements.typeahead.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/elements.wysiwyg.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/elements.spinner.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/elements.treeview.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/elements.wizard.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/elements.aside.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/ace.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/ace.ajax-content.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/ace.touch-drag.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/ace.sidebar.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/ace.sidebar-scroll-1.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/ace.submenu-hover.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/ace.widget-box.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/ace.settings.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/ace.settings-rtl.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/ace.settings-skin.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/ace.widget-on-reload.js"></script>
		<script src="#(ctx)/res/ace-1.3.3/assets/js/ace/ace.searchbox-autocomplete.js"></script>
		
		<!--表单验证 -->
		<script src="#(ctx)/res/ace-1.3.3/assets/js/jquery.validate.js"></script>
		<!-- 弹出层 -->
		<script src="#(ctx)/res/js/ajaxfileupload.js"></script>
		<script src="#(ctx)/res/js/bootstrap-switch.min.js"></script>
		<script src="#(ctx)/res/js/layer/layer.js"></script>
		<script src="#(ctx)/res/js/ueditor/ueditor.config.js"></script>
		<script src="#(ctx)/res/js/ueditor/ueditor.all.min.js"></script>
		<script type="text/javascript">
		String.prototype.trim = function() {
				return this.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
		}
		
		function resize(grid_selector){
			//调整大小以适应页面大小
			$(window).on('resize.jqGrid', function () {
				$(grid_selector).jqGrid( 'setGridWidth', $(".page-content").width() );
		    });
        	
			//在侧栏折叠/展开调整
			var parent_column = $(grid_selector).closest('[class*="col-"]');
			$(document).on('settings.ace.jqGrid' , function(ev, event_name, collapsed) {
				if( event_name === 'sidebar_collapsed' || event_name === 'main_container_fixed' ) {
					//setTimeout is for webkit only to give time for DOM changes and then redraw!!!
					setTimeout(function() {
						$(grid_selector).jqGrid( 'setGridWidth', parent_column.width() );
					}, 0);
				}
			 });
		}
		
	 	//获得选中行
      	function getOneSelectedRows(grid) {
            var rowKey = grid.getGridParam("selrow");
            if (!rowKey){
            	//没有选中
                return "-1";
            }else {
                var selectedIDs = grid.getGridParam("selarrrow");
                var result = "";
                /* for (var i = 0; i < selectedIDs.length; i++) {
                    result += selectedIDs[i] + ",";
                } */
                if(selectedIDs.length==1){
                	//选中一行
                	return selectedIDs[0];
                }else{
                	//选中多行
                	return "-2";
                }
            } 
      	}
	 	
      	/**获取选中的列***/
		function getSelectedRows(grid) {
            var rowKey = grid.getGridParam("selrow");
            if (!rowKey)
                return "-1";
            else {
                var selectedIDs = grid.getGridParam("selarrrow");
                var result = "";
                for (var i = 0; i < selectedIDs.length; i++) {
                    result += selectedIDs[i] + ",";
                }
                return result;
            }                
        }
      	
		//替换分页图标
		function updatePagerIcons(table) {
			var replacement = 
			{
				'ui-icon-seek-first' : 'ace-icon fa fa-angle-double-left bigger-140',
				'ui-icon-seek-prev' : 'ace-icon fa fa-angle-left bigger-140',
				'ui-icon-seek-next' : 'ace-icon fa fa-angle-right bigger-140',
				'ui-icon-seek-end' : 'ace-icon fa fa-angle-double-right bigger-140'
			};
			$('.ui-pg-table:not(.navtable) > tbody > tr > .ui-pg-button > .ui-icon').each(function(){
				var icon = $(this);
				var $class = $.trim(icon.attr('class').replace('ui-icon', ''));
				if($class in replacement) icon.attr('class', 'ui-icon '+replacement[$class]);
			})
		}
		</script>

#end